package com.uwlaser.service;

import com.uwlaser.base.PageInfo;
import com.uwlaser.base.CommonService;
import com.uwlaser.domain.FactoryAttribute;
import com.uwlaser.service.dto.FactoryAttributeDto;
import com.uwlaser.service.dto.FactoryAttributeQueryParam;
import org.springframework.data.domain.Pageable;
import java.util.List;
import java.util.Set;

/**
* @author QZK
* @date 2022-05-11
*/
public interface FactoryAttributeService extends CommonService<FactoryAttribute>  {

    static final String CACHE_KEY = "factoryAttribute";

    /**
    * 查询数据分页
    * @param query 条件
    * @param pageable 分页参数
    * @return PageInfo<FactoryAttributeDto>
    */
    PageInfo<FactoryAttributeDto> queryAll(FactoryAttributeQueryParam query, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param query 条件参数
    * @return List<FactoryAttributeDto>
    */
    List<FactoryAttributeDto> queryAll(FactoryAttributeQueryParam query);

    FactoryAttribute getById(Integer id);
    FactoryAttributeDto findById(Integer id);

    /**
     * 插入一条新数据。
     */
    int insert(FactoryAttributeDto resources);
    int updateById(FactoryAttributeDto resources);
    int removeById(Integer id);
    int removeByIds(Set<Integer> ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    // void download(List<FactoryAttributeDto> all, HttpServletResponse response) throws IOException;
}
